From b9cbd513127254780ae59c8e17ab2c47eea301cb Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 14 Jan 2026 17:40:37 +0100
Subject: feat: start working on alpine early init blog post, do a bunch of
 other blog related stuff

---
 src/routes/blog/[id=int]/+page.svelte | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/routes/blog/[id=int]/+page.svelte')

diff --git a/src/routes/blog/[id=int]/+page.svelte b/src/routes/blog/[id=int]/+page.svelte
index 84d33ef..574ea76 100644
--- a/src/routes/blog/[id=int]/+page.svelte
+++ b/src/routes/blog/[id=int]/+page.svelte
@@ -10,22 +10,21 @@
 
   let { data }: PageProps = $props();
 
-  let route = $derived(
+  let route = () =>
     forceTrailingSlash(
       resolve('/blog/[id=int]-[slug]', {
         id: data.post.metadata.id.toString(),
         slug: data.post.metadata.slug,
       }),
-    ),
-  );
+    ) + `${page.url.search}${page.url.hash}`;
 
   onMount(() => {
-    tick().then(() => replaceState(route, page.state));
+    tick().then(() => replaceState(route(), page.state));
   });
 </script>
 
 <svelte:head>
-  <link rel="canonical" href={new URL(route, page.url).href} />
+  <link rel="canonical" href={new URL(route(), page.url).href} />
 </svelte:head>
 
 <Post post={data.post} filename={data.filename} />
-- 
cgit v1.2.3

